#! /usr/bin/env python
# -*- python -*-

import sys

py2 = py30 = py31 = False
version = sys.hexversion
if version >= 0x020600F0 and version < 0x03000000 :
    py2 = True    # Python 2.6 or 2.7
    from Tkinter import *
    import ttk
elif version >= 0x03000000 and version < 0x03010000 :
    py30 = True
    from tkinter import *
    import ttk
elif version >= 0x03010000:
    py31 = True
    from tkinter import *
    import tkinter.ttk as ttk
else:
    print ("""
    You do not have a version of python supporting ttk widgets..
    You need a version >= 2.6 to execute PAGE modules.
    """)
    sys.exit()



def vp_start_gui():
    '''Starting point when module is the main routine.'''
    global val, w, root
    root = Tk()
    root.title('New_Toplevel_1')
    root.geometry('600x450+590+339')
    w = New_Toplevel_1 (root)
    init()
    root.mainloop()

w = None
def create_New_Toplevel_1 (root):
    '''Starting point when module is imported by another program.'''
    global w, w_win
    if w: # So we have only one instance of window.
        return
    w = Toplevel (root)
    w.title('New_Toplevel_1')
    w.geometry('600x450+590+339')
    w_win = New_Toplevel_1 (w)
    init()
    return w_win

def destroy_New_Toplevel_1 ():
    global w
    w.destroy()
    w = None




def init():
    pass




class New_Toplevel_1:
    def __init__(self, master=None):
        # Set background of toplevel window to match
        # current style
        style = ttk.Style()
        theme = style.theme_use()
        default = style.lookup(theme, 'background')
        master.configure(background=default)

        self.Frame1 = Frame (master)
        self.Frame1.place(relx=0.03,rely=0.04,relheight=0.9,relwidth=0.93)
        self.Frame1.configure(relief=GROOVE)
        self.Frame1.configure(borderwidth="2")
        self.Frame1.configure(relief="groove")

        self.Button1 = Button (self.Frame1)
        self.Button1.place(relx=0.47,rely=0.05,height=24,width=47)
        self.Button1.configure(pady="0")
        self.Button1.configure(text='''button''')

        self.Entry1 = Entry (self.Frame1)
        self.Entry1.place(relx=0.22,rely=0.05,relheight=0.05,relwidth=0.22)
        self.Entry1.configure(background="white")

        self.Label1 = Label (self.Frame1)
        self.Label1.place(relx=0.13,rely=0.05,height=21,width=31)
        self.Label1.configure(text='''label''')







if __name__ == '__main__':
    vp_start_gui()

